﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Logistics_Management_System.Branch
{
    public class Branch_Repository : ServiceBase
    {
        public LG_Branch GetBranchById(int bran_id)
        { return (from bran in this.DB.LG_Branches where bran.Id == bran_id select bran).FirstOrDefault<LG_Branch>(); }

        public List<LG_Branch> GetBranchesByLocation(int locaion_id)
        { return (from bran in this.DB.LG_Branches where bran.Location_Id == locaion_id select bran).ToList<LG_Branch>(); }
    }
}